{{assign var="title" value="角色列表"}}
{{include file="admin/intop.html"}}
<script type="text/javascript">
var closeListerner = function(){ window.location.reload(); }
function add(){
	showDialog("admin.php?ctl=role&act=add",320,160,"添加角色", true, closeListerner);
}
function edit(id){
	showDialog("admin.php?ctl=role&act=edit&id="+id,320,160,"修改角色", false, closeListerner);
}
</script>
<div class="toolsBar">
	<form id="form1" name="form1" method="post" action="admin.php?ctl=role">
		<input type="button" value="添加角色" onclick="add()" class="button_style">
		&nbsp;&nbsp;&nbsp;&nbsp;
		<select name="state" id="state">
		   <option value="">--不限状态--</option>
		   <option value="1"{{if $smarty.request.state==1}} selected="selected"{{/if}}>启用</option>
		   <option value="2"{{if $smarty.request.state==2}} selected="selected"{{/if}}>禁用</option>		   
		</select>
		<input type="text" name="title" id="title" value="{{$smarty.request.title}}" class="input_blur">
		<input type="submit" name="button" id="button" value="==查找==" class="button_style">
	</form>
</div>
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="table_list">
	<tr>
		<th>ID</th>
		<th>角色名称</th>
		<th>状态</th>
		<th>创建日期</th>
		<th>操作</th>
	</tr>
	{{foreach from=$res.data item=item}}
	<tr>
		<td>{{$item.ID}}</td>
		<td>{{$item.ROLE_NAME}}</td>
		<td>{{if $item.STATE==1}}启用{{else}}禁用{{/if}}</td>
		<td>{{$item.CREATE_TIME|date_format:"%Y-%m-%d %H:%M:%S"}}</td>
		<td><a id="GridView1_ctl02_hlkEdit" href="javascript:edit({{$item.ID}})">修改</a>
			| <a id="GridView1_ctl02_hlkDel" href="admin.php?ctl=role&act=del&id={{$item.ID}}">删除</a>
		</td>
	</tr>
	{{/foreach}}
	{{if $res.count}}
		<tr class="bottom"><td colspan="5" class="page">{{$res.page}}</td></tr>
	{{else}}
		<tr><td colspan="5">没有数据记录</td></tr>
	{{/if}}
</table>
{{include file="admin/infoot.html"}}